package com.ki.glasscase.svc.services;

import java.io.File;
import java.net.URL;

/**
 * Created by Khacheresyants.l on 3/11/14.
 */
public class DownloadProperties {
    private URL url;
    private File winFile;
    private File unixFile;

    public URL getUrl() {
        return url;
    }

    public void setUrl(URL url) {
        this.url = url;
    }

    public File getWinFile() {
        return winFile;
    }


    public void setWinFile(File winFile) {
        this.winFile = winFile;
    }

    public File getUnixFile() {
        return unixFile;
    }

    public void setUnixFile(File unixFile) {
        this.unixFile = unixFile;
    }

    public File getCurrentOS(String systemProperty){
        File file = null;
        if (systemProperty.contains("win")) {
           file = getWinFile();
        } else if (systemProperty.contains("nix")) {
            file = getUnixFile();
        } else {
            file = getWinFile();
        }
        return file;
    }
}
